package com.wetsion.securityoauthdemo.rmsclient.handler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 默认认证失败的处理，默认失败重定向跳往 /login
 *
 * @author weixin
 * @version 1.0
 * @CLassName DefaultAuthenticationFailureHandler
 * @date 2019/3/8 3:56 PM
 */
public class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandler {
    @Override
    public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        response.sendRedirect("/login");
    }
}
